package com.cn.jiyun.contoller;




import com.cn.jiyun.service.ScenticTicketsService;

import com.jiyun.entity.pojo.ScenicTickets;
import com.jiyun.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("scenicTickets")
public class ScenticTicketsController {
    @Autowired
    private ScenticTicketsService scenicTicketsService;
    @GetMapping("findAll")
    public Result<List<ScenicTickets>> findAll(@RequestParam(required = false) String scenicName,
                                               @RequestParam(required = false) String sort){
        return Result.ok(scenicTicketsService.findAll(scenicName,sort));
    }



}
